package com.bilibili.servlet;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.bilibili.entity.CommenResult;
import com.bilibili.service.FollowService;
import com.bilibili.service.impl.FollowServiceImpl;


@WebServlet("/allFollowerCount.do")
public class AllFollowerCountServlet extends HttpServlet {
	FollowService fs = new FollowServiceImpl();
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		// TODO Auto-generated method stub
		response.setContentType("application/json;charset=utf-8");
    	int followerCount = fs.SelectFollower(1);
    	CommenResult result = new CommenResult();
    	result.setData(followerCount);
    	response.getWriter().write(result.toJOSNString());
	}


}
